# coding=utf-8
"""
# Author : Hunter Oakley
# Time   : 2022/5/22 22:02
# Descripation:
"""
from django.urls import path,re_path
from django.views.static import serve
from django.conf import settings
from web_user import views


urlpatterns = [

    # 启用media目录
    re_path(r"^media/(?P<path>.*)$",serve,{"document_root":settings.MEDIA_ROOT},name="media"),

    # 部门管理
    path('depart/list/', views.depart_list),
    path('depart/add/', views.depart_add),
    path('depart/delete/', views.depart_delete),
    # <int:nid>表示正则的意思,加上这个表示你以后的url中必须带上这个值
    # http://127.0.0.1:8000/depart/10/edit/
    # http://127.0.0.1:8000/depart/2/edit/
    # http://127.0.0.1:8000/depart/5/edit/
    # 如果在url中加入了这个正则，那么在视图函数中可以传入这个参数
    path('depart/<int:nid>/edit/', views.depart_edit),
    path('depart/multi/', views.depart_multi),

    # 用户管理
    path('user/list/',views.user_list),
    path('user/add/',views.user_add),
    path('user/model/form/add/',views.user_model_form_add),
    path('user/<int:nid>/edit/',views.user_edit),
    path('user/delete/', views.user_delete),

    # 靓号管理
    path('pretty/list/',views.pretty_list),
    path('pretty/add/',views.pretty_add),
    path('pretty/<int:nid>/edit/',views.pretty_edit),
    path('pretty/delete/',views.pretty_delete),

    # 管理员
    path('admin/list/',views.admin_list),
    path('admin/add/',views.admin_add),
    path('admin/<int:nid>/edit/',views.admin_edit),
    path('admin/<int:nid>/delete/',views.admin_delete),
    path('admin/<int:nid>/reset/',views.admin_reset),

    # 登录
    path('login/',views.login),
    path('logout/',views.logout),
    path('image/code/',views.image_code),

    # 任务管理
    path('task/list/',views.task_list),
    path('task/ajax/',views.task_ajax),
    path('task/add/',views.task_add),

    # 订单管理
    path('order/list/',views.order_list),
    path('order/add/',views.order_add),
    path('order/delete/',views.order_delete),
    path('order/detail/',views.order_detail),
    path('order/edit/',views.order_edit),

    # 数据统计
    path('chart/list/', views.chart_list),
    path('chart/bar/', views.chart_bar),
    path('chart/pie/', views.chart_pie),
    path('chart/line/', views.chart_line),
    path('highcharts/list/', views.highcharts_list),

    # 上传文件
    path('upload/list/', views.upload_list),
    path('upload/form/', views.upload_from),
    path('upload/model/form/', views.upload_model_form),

    # 城市列表
    path('city/list/', views.city_list),
    path('city/add/', views.city_add),



]
